#!/bin/bash
CB_DEVEL=devel$1
CB_OUTPUT=output$1
CB_DEVEL_RESDIR=$CB_DEVEL/share/codeblocks
CB_OUTPUT_RESDIR=$CB_OUTPUT/share/codeblocks
# Fix name and remove old file
mv -f ../../../${CB_DEVEL_RESDIR}/plugins/lib_finder.so ../../../${CB_DEVEL_RESDIR}/plugins/liblib_finder.so > /dev/null 2> /dev/null
rm -f ../../../${CB_OUTPUT_RESDIR}/plugins/lib_finder.so
mkdir -p ../../../${CB_DEVEL_RESDIR}/lib_finder > /dev/null 2> /dev/null
mkdir -p ../../../${CB_OUTPUT_RESDIR}/lib_finder > /dev/null 2> /dev/null
cp ./lib_finder/*.xml ../../../${CB_DEVEL_RESDIR}/lib_finder > /dev/null 2> /dev/null
cp ./lib_finder/*.xml ../../../${CB_OUTPUT_RESDIR}/lib_finder > /dev/null 2> /dev/null
zip -j9 ../../../${CB_DEVEL_RESDIR}/lib_finder.zip manifest.xml
exit 0
